<template><div><h2 id="警告框" tabindex="-1"><a class="header-anchor" href="#警告框"><span>警告框</span></a></h2>
<h3 id="alert" tabindex="-1"><a class="header-anchor" href="#alert"><span>Alert</span></a></h3>
<p>基本用法</p>
<div class="language-php line-numbers-mode" data-highlighter="prismjs" data-ext="php" data-title="php"><pre v-pre class="language-php"><code><span class="line"><span class="token php language-php"><span class="token delimiter important">&lt;?php</span></span>
<span class="line"></span>
<span class="line"><span class="token keyword">use</span> <span class="token package">Dcat<span class="token punctuation">\</span>Admin<span class="token punctuation">\</span>Widgets<span class="token punctuation">\</span>Alert</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token variable">$alert</span> <span class="token operator">=</span> <span class="token class-name static-context">Alert</span><span class="token operator">::</span><span class="token function">make</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'内容'</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">'标题'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 类型</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">success</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">danger</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">info</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">warning</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 图标</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">icon</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'feather icon-x'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 可移除按钮</span></span>
<span class="line"><span class="token variable">$alert</span><span class="token operator">-></span><span class="token function">removable</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>效果<br>
<img src="@source/dcat-admin-2x/assets/images/f56f6aab-1f23-4f3a-9615-fefa7d711a89-KVwzJKFwa2.png" alt=""></p>
<h3 id="callout" tabindex="-1"><a class="header-anchor" href="#callout"><span>Callout</span></a></h3>
<div class="language-php line-numbers-mode" data-highlighter="prismjs" data-ext="php" data-title="php"><pre v-pre class="language-php"><code><span class="line"><span class="token php language-php"><span class="token delimiter important">&lt;?php</span></span>
<span class="line"></span>
<span class="line"><span class="token keyword">use</span> <span class="token package">Dcat<span class="token punctuation">\</span>Admin<span class="token punctuation">\</span>Widgets<span class="token punctuation">\</span>Callout</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token variable">$callout</span> <span class="token operator">=</span> <span class="token class-name static-context">Callout</span><span class="token operator">::</span><span class="token function">make</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'内容'</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">'标题'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 颜色</span></span>
<span class="line"><span class="token variable">$callout</span><span class="token operator">-></span><span class="token function">light</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"><span class="token variable">$callout</span><span class="token operator">-></span><span class="token function">primary</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 可移除按钮</span></span>
<span class="line"><span class="token variable">$callout</span><span class="token operator">-></span><span class="token function">removable</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>效果<br>
<img src="@source/dcat-admin-2x/assets/images/06f05c32-09b8-45e7-b18a-34ce9bd89d84-g7d7lp0szM.png" alt=""></p>
<p>本文章首发在 <a href="https://learnku.com/" target="_blank" rel="noopener noreferrer">LearnKu.com</a> 网站上。</p>
</div></template>


